<?php

//require_once  __DIR__ . '/includes/authenticate.php';

if (isset($_POST['season']) && isset($_POST['gamenumber']) && isset($_POST['playerID'])) {

	include_once './db_bb_connect.php';
	
	$season = $_POST['season'];
	$gamenumber = $_POST['gamenumber'];
	$playerID = $_POST['playerID'];

	$sql = "DELETE FROM stats 
	WHERE playerID = '$playerID'
	AND gamenumber = '$gamenumber'
	AND season = '$season'";

	if ($db->query($sql)) {
		echo "<h5><strong> &emsp;&emsp;&emsp; Entry Deleted! </strong></h5>";
	} else {
		echo "Delete failed";
	}

}

?>